package appgui;

import java.awt.EventQueue;
import javax.swing.JFrame;
import java.awt.BorderLayout;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import java.awt.Dimension;

public class MainWindow {

	private JFrame frmLunchbox;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					MainWindow window = new MainWindow();
					window.frmLunchbox.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public MainWindow() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frmLunchbox = new JFrame();
		frmLunchbox.setMinimumSize(new Dimension(900, 600));
		frmLunchbox.setPreferredSize(new Dimension(900, 600));
		frmLunchbox.setSize(new Dimension(900, 600));
		frmLunchbox.setTitle("LunchBox");
		frmLunchbox.setBounds(100, 100, 800, 700);
		frmLunchbox.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frmLunchbox.getContentPane().setLayout(new BorderLayout(0, 0));
		
		JLabel lbl_title = new JLabel("Welcome to LunchBox");
		lbl_title.setName("lbl_title");
		lbl_title.setHorizontalAlignment(SwingConstants.CENTER);
		frmLunchbox.getContentPane().add(lbl_title, BorderLayout.NORTH);
		
		FileViewer fileViewer = new FileViewer();
		fileViewer.setPreferredSize(new Dimension(300, 600));
		fileViewer.setMinimumSize(new Dimension(300, 600));
		fileViewer.setSize(new Dimension(300, 600));
		frmLunchbox.getContentPane().add(fileViewer, BorderLayout.WEST);
		
		ContentViewer contentViewer = new ContentViewer();
		contentViewer.setSize(new Dimension(550, 550));
		contentViewer.setPreferredSize(new Dimension(550, 550));
		contentViewer.setMinimumSize(new Dimension(550, 550));
		frmLunchbox.getContentPane().add(contentViewer, BorderLayout.CENTER);
	}
}
